﻿@{
    ViewBag.Title = "网站管理";
    ViewBag.MenuIndex = 2;
}

@model IPagedList<Xwork.SEO.SeoSite>
<div class="ny">
    <div class="ny_kb9"></div>
    <table id="myTable" style="width:990px; margin-bottom:10px;" class="tablesorter" border="0" cellpadding="0" cellspacing="0">
    	<thead>
        	<tr class="even">
                <th width="19%"><h3>站点</h3></th>
                <th width="12%"><h3>查看关键词</h3></th>
                <th width="10%" class="header"><h3>关键词数量</h3></th>
                <th width="9%" class="header"><h3>累积消费</h3></th>
                <th width="9%" class="header"><h3>创建日期</h3></th>
                <th width="9%" class="header"><h3>状态</h3></th>
                <th><h3>管理</h3></th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr class="even">
                <td width="19%"><a target="_blank" href="@("http://"+item.SiteUrl)">@item.SiteUrl</a></td>
                <td width="12%">@item.UserID</td>
                <td width="10%">@item.SeoKeywords.Count</td>
                <td width="9%" >@item.SeoKeywords.Sum(p=>p.ConsumeAmount)</td>
                <td width="11%">@item.CreateTime.ToShortDateString()</td>
                <td width="9%">@(item.IsAuthenticated ? "已验证" : "未验证")</td>
                <td>
                    <a href="@Url.Action("addKeyword", new { siteid = item.ID })">添加关键词</a>
                    <a href="@Url.Action("keywords", new { siteid = item.ID })">查看关键词</a>
                    <a href="@Url.Action("addsite", new { siteid = item.ID })">编辑</a>
                    <a href="@Url.Action("deletesite", new { siteid = item.ID })" ajax="true">删除</a>
                </td>
                </tr>
            }
        </tbody>
    </table>
    <div style="text-align:right;">
        @Html.PagedListPager(Model, p => Url.Action("userlist", new { pageindex = p }))
    </div>
</div>

